<?php
class Usuario extends EntidadBase{
    private $id;
    private $tx_nombre;
    private $tx_apellidoPaterno;
    private $tx_apellidoMaterno;
    private $tx_correo;
    private $tx_username;
    private $tx_password;
    private $id_TipoUsuario;
    private $dt_registro;
    public function __construct() {
        $table="tbl_users";
        parent::__construct($table);
    }

    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
    }

    public function getNombre() {
        return $this->nombre;
    }

    public function setNombre($nombre) {
        $this->nombre = $nombre;
    }

    public function getApellido() {
        return $this->apellido;
    }

    public function setApellido($apellido) {
        $this->apellido = $apellido;
    }

    public function getEmail() {
        return $this->email;
    }

    public function setEmail($email) {
        $this->email = $email;
    }

    public function getPassword() {
        return $this->password;
    }

    public function setPassword($password) {
        $this->password = $password;
    }
    public function save(){
        $query="INSERT INTO tbl_users (id_usuario,tx_nombre,tx_apellidoPaterno,tx_apellidoMaterno,tx_correo, tx_username, tx_password, id_TipoUsuario, dt_registro)
                VALUES(NULL,
                       '".$this->tx_nombre."',
                       '".$this->tx_apellidoPaterno."',
                       '".$this->tx_apellidoMaterno."',
                       '".$this->tx_correo."',
                       '".$this->tx_username."',
                       '".$this->tx_password."',
                       '".$this->id_TipoUsuario."',
                       '".$this->dt_registro."');";
        $save=$this->db()->query($query);
        //$this->db()->error;
        return $save;
    }

}
/*class Usuario extends EntidadBase{
    private $id;
    private $nombre;
    private $apellido;
    private $email;
    private $password;
    public function __construct() {
        $table="usuarios";
        parent::__construct($table);
    }

    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
    }

    public function getNombre() {
        return $this->nombre;
    }

    public function setNombre($nombre) {
        $this->nombre = $nombre;
    }

    public function getApellido() {
        return $this->apellido;
    }

    public function setApellido($apellido) {
        $this->apellido = $apellido;
    }

    public function getEmail() {
        return $this->email;
    }

    public function setEmail($email) {
        $this->email = $email;
    }

    public function getPassword() {
        return $this->password;
    }

    public function setPassword($password) {
        $this->password = $password;
    }
    public function save(){
        $query="INSERT INTO usuarios (id,nombre,apellido,email,password)
                VALUES(NULL,
                       '".$this->nombre."',
                       '".$this->apellido."',
                       '".$this->email."',
                       '".$this->password."');";
        $save=$this->db()->query($query);
        //$this->db()->error;
        return $save;
    }

}*/

?>